<script type="text/javascript" src="/ueditor/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="/ueditor/ueditor.all.min.js"></script>
<!-- 编辑器公式插件 -->
<script type="text/javascript" charset="utf-8" src="/ueditor/kityformula-plugin/addKityFormulaDialog.js"></script>
<script type="text/javascript" charset="utf-8" src="/ueditor/kityformula-plugin/getKfContent.js"></script>
<script type="text/javascript" charset="utf-8" src="/ueditor/kityformula-plugin/defaultFilterFix.js"></script>
<div class="span10" id="datacontent">

    <ul class="breadcrumb">
        <li><a href="/exercise/index/index">剑雅真题</a> <span class="divider">/</span></li>
        <li><a href="/exercise/read/index">阅读练习</a> <span class="divider">/</span></li>
        <li class="active">修改题目</li>
    </ul>
    <form action="/exercise/read/update-detail" method="post" class="form-horizontal">
        <fieldset>
            <div class="control-group">
                <label for="area" class="control-label">分类名称：</label>
                <div class="controls">
                    <input type="text" value="<?php echo $data->catName?>" name="catName" readonly>
                </div>
            </div>
            <div class="control-group">
                <label for="area" class="control-label">题号：</label>
                <div class="controls">
                    <input type="text" value="<?php echo $data->name?>" name="name">
                </div>
            </div>
            <div class="control-group">
                <label for="area" class="control-label">题目：</label>
                <div class="controls">
                    <textarea name="article" style="width: 50%;height: 200px;"><?php echo $data->article?></textarea>
                </div>
            </div>
            
            <div class="control-group">
                <label for="area" class="control-label">描述：</label>
                <div class="controls">
                    <textarea name="description" style="width: 50%;height: 200px;"><?php echo $data->description?></textarea>
                </div>
            </div>

            
            <div class="control-group">
                <label for="area" class="control-label">答案：</label>
                <div class="controls" >
                    <input type="text" name="answer" value="<?php echo $data->answer?>">

                </div>
            </div>

            <div class="control-group">
                <label for="area" class="control-label">解析：</label>
                <div class="controls">
                    <textarea name="analysis" style="width: 50%;height: 200px;"><?php echo $data->analysis?></textarea>
                </div>
            </div>

            <div class="control-group">
                <div class="controls">
                    <button class="btn btn-primary" type="submit">提交</button>
                    <input type="hidden" name="id" value="<?php echo $id?>"/>
                </div>
            </div>
        </fieldset>
    </form>
</div>
<script>
    // //实例化编辑器
    // var o_ueditorupload = UE.getEditor('sss',
    // {
    //     autoHeightEnabled:false
    // });

    // var o_ueditorupload2 = UE.getEditor('sss2',
    // {
    //     autoHeightEnabled:false
    // });
    
    o_ueditorupload.ready(function ()
    {

        // o_ueditorupload.hide();//隐藏编辑器

        //监听图片上传
        o_ueditorupload.addListener('beforeInsertImage', function (t,arg)
        {
            $('.image').val(arg[0].src);

        });

        /* 文件上传监听
         * 需要在ueditor.all.min.js文件中找到
         * d.execCommand("insertHtml",l)
         * 之后插入d.fireEvent('afterUpfile',b)
         */
        o_ueditorupload.addListener('afterUpfile', function (t, arg)
        {

        });
    });

    //弹出图片上传的对话框
    function upImage()
    {
        var myImage = o_ueditorupload.getDialog("insertimage");
        myImage.open();
    }
</script>